Current Location: Home> Function Categories> atan2

atan2

Arctangle of two parameters
Name:atan2
Category:math
Programming Language:php
One-line Description:Arctangent of two parameters.

Definition and usage

atan2() function returns the arctangent of two parameters, with the return value being radians, whose value is between -PI and PI (including -PI and PI).

Example

This example calculates the arctangent value of different variables x and y:

 <?php
echo ( atan2 ( 0.50 , 0.50 ) ) ;
echo ( atan2 ( - 0.50 , - 0.50 ) ) ;
echo ( atan2 ( 5 , 5 ) ) ;
echo ( atan2 ( 10 , 20 ) ) ;
echo ( atan2 ( - 5 , - 5 ) ) ;
echo ( atan2 ( - 10 , 10 ) )
?>

Try it yourself

grammar

 atan2( x , y )
parameter describe
x Required. A number.
y Required. A number.

illustrate

atan2() function calculates the arctangent value of two variables x and y . Similar to calculating the arctangent tangent of y/x, the difference is that the symbol of the two parameters is used to determine the result outside the quadrant.

Similar Functions
  • Sine sin

    sin

    Sine
  • Find the minimum value min

    min

    Findtheminimumvalue
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Hyperbolic sine sinh

    sinh

    Hyperbolicsine
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Leave the method of sorting floor

    floor

    Leavethemethodofsort
  • Get the pi value pi

    pi

    Getthepivalue
  • Convert hexadecimal to decimal hexdec

    hexdec

    Converthexadecimalto
Popular Articles